import mongoose from 'mongoose';

const instance = (database: string) => {
  mongoose.connect(`mongodb://${process.env.MONGO_HOST}:${process.env.MONGO_PORT}`, {
    dbName: database,
    user: process.env.MONGO_USERNAME,
    pass: process.env.MONGO_PASSWORD,
  });
};

export const DEMOMongo = instance('demo');
